<template>
	<view class="content">
		<view class="bgc">
			<view class="avatar-box">
				<view>
					<u-avatar :src="dataP.avatar" size="160"></u-avatar>
				</view>
				<view class="nickname">{{dataP.ipname}}</view>
			</view>
			<view class="cell-warp">
				<view style="border-bottom: 1px solid #ebebeb;" @click="jump(0)">
					<listCell leftIcon="../../../static/icon/my_module/healthInfo/birthYear.png" leftText="出生年份"
						rightIcon="../../../static/icon/my_module/healthInfo/jiantou.png"
						:rightText="data.birthyear"></listCell>
				</view>
				<view style="border-bottom: 1px solid #ebebeb;" @click="jump(1)">
					<listCell leftIcon="../../../static/icon/my_module/healthInfo/ill_time.png" leftText="首次发病时间"
						rightIcon="../../../static/icon/my_module/healthInfo/jiantou.png" :rightText="data.illtime">
					</listCell>
				</view>
				<view style="border-bottom: 1px solid #ebebeb;" @click="jump(2)">
					<listCell leftIcon="../../../static/icon/my_module/healthInfo/heightP.png" leftText="身高"
						rightIcon="../../../static/icon/my_module/healthInfo/jiantou.png" :rightText="data.height">
					</listCell>
				</view>
				<view style="border-bottom: 1px solid #ebebeb;" @click="jump(3)">
					<listCell leftIcon="../../../static/icon/my_module/healthInfo/weightP.png" leftText="体重"
						rightIcon="../../../static/icon/my_module/healthInfo/jiantou.png" :rightText="data.weight">
					</listCell>
				</view>
				<view style="border-bottom: 1px solid #ebebeb;" @click="jump(4)">
					<listCell leftIcon="../../../static/icon/my_module/healthInfo/surgery.png" leftText="手术时间"
						rightIcon="../../../static/icon/my_module/healthInfo/jiantou.png" :rightText="data.surgerytime">
					</listCell>
				</view>
				<view style="border-bottom: 1px solid #ebebeb;" @click="jump(5)">
					<listCell leftIcon="../../../static/icon/my_module/healthInfo/degree.png" leftText="轻重程度"
						rightIcon="../../../static/icon/my_module/healthInfo/jiantou.png" :rightText="data.degree">
					</listCell>
				</view>
				<view @click="jump(6)">
					<listCell leftIcon="../../../static/icon/my_module/healthInfo/ill_type.png" leftText="病例分类"
						rightIcon="../../../static/icon/my_module/healthInfo/jiantou.png" :rightText="data.illtype">
					</listCell>
				</view>
			</view>
		</view>


	</view>
</template>

<script>
	import bigBtnL from '@/components/bigButtonLeft.vue';
	import listCell from '@/components/listCell.vue';
	export default {
		components: {
			bigBtnL,
			listCell
		},
		data() {
			return {
				src: '../../../static/icon/my_module/healthInfo/default.png',

				btnBoxWidthL: 300,
				btnBoxHeightL: 120,
				btnColorL: "#3FB8D9",
				btnImgSrcL: "../../../static/icon/training/share.png",
				btnTextL: "分享视频",
				btnTextColorL: "#ffffff",
				btnTextSizeL: 20,
				btnImgWidthL: 50,
				btnRadiusL: 50,

				btnBoxWidthR: 300,
				btnBoxHeightR: 120,
				btnColorR: "#FF6B3D",
				btnImgSrcR: "../../../static/icon/training/home.png",
				btnTextR: "返回首页",
				btnTextColorR: "#ffffff",
				btnTextSizeR: 20,
				btnImgWidthR: 50,
				btnRadiusR: 50,

				data: {},
				dataP: {},

				urlList: [{
						url: '../health/info-date/info-date'
					},
					{
						url: '../health/info-ill-time/info-ill-time'
					},
					{
						url: '../health/info-height-w/info-height-w'
					},
					{
						url: '../health/info-height-w/info-height-w'
					},
					{
						url: '../health/surgery-time/surgery-time'
					},
					{
						url: '../health/ill-details/ill-details'
					},{
						url: '../health/ill-details/ill-details'
					}
				]
			}
		},
		onLoad() {
			this.getInfo();
		},
		methods: {
			jump(index) {
				uni.navigateTo({
					url: this.urlList[index].url
				})
			},
			getInfo() {
				this.data = uni.getStorageSync("healthInfo");
				this.dataP = uni.getStorageSync("accountInfo");
				console.log(this.data)
			}
		}
	}
</script>

<style>
	@import url("healthInfo.css");
</style>
